//
//  LPPMyLotteryController.m
//  Lottery
//
//  Created by 刘盼 on 16/1/21.
//  Copyright © 2016年 lhheh. All rights reserved.
//

#import "LPPMyLotteryController.h"
#import "LPPSettingController.h"
#import "LPPHelpController.h"

@interface LPPMyLotteryController ()
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;

@end

@implementation LPPMyLotteryController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    UIImage *image = [UIImage imageNamed:@"RedButton"];
    
    UIImage *imagePress = [UIImage imageNamed:@"RedButtonPressed"];
    
    //拉伸图片
    image = [image stretchableImageWithLeftCapWidth:image.size.width *0.5 topCapHeight:image.size.height *0.5];
    
    imagePress = [imagePress stretchableImageWithLeftCapWidth:imagePress.size.width *0.5 topCapHeight:imagePress.size.height *0.5];
    
    [self.loginBtn setBackgroundImage:image forState:UIControlStateNormal];
    
    [self.loginBtn setBackgroundImage:imagePress forState:UIControlStateSelected];
}
- (IBAction)settingBtn:(id)sender {
    
    LPPSettingController *setting = [[LPPSettingController alloc]init];
    //设置导航栏文字
    setting.title = @"设置";
    //设置plist文件名称
    setting.plistName = @"setting";
    
    UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithTitle:@"常见问题" style:UIBarButtonItemStylePlain target:self action:@selector(help)];
    
    setting.navigationItem.rightBarButtonItem = item;
   
    [self.navigationController pushViewController:setting animated:YES];
}

-(void)help {
    
    LPPHelpController *help = [[LPPHelpController alloc]init];
    
    [self.navigationController pushViewController:help animated:YES];
}
@end
